package com.ywu.component.spi.spi;

import com.ywu.common.result.CommonResult;
import com.ywu.component.spi.dto.ComponentDto;
import com.ywu.component.spi.entity.ComponentEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @ClassName ComponentSpi
 * @Description TODO
 * @Author GroundDemo
 * @Date 2024/3/31 10:49
 * @Version 1.0
 **/
@FeignClient(value = "YWU-COMPONENTS")
public interface ComponentSpi {
    @PostMapping("/ywu/component/component.query.list")
    CommonResult<Object> queryComponents(@RequestBody ComponentDto componentDto);

    @PostMapping("/ywu/component/component.query.list.with.no.content")
    CommonResult<Object> queryComponentsWithNoContent(@RequestBody ComponentDto componentDto);

    @PostMapping("/ywu/component/component.batch.query.by.ids.spi")
    CommonResult<List<ComponentEntity>> batchQueryByIds(@RequestBody List<Integer> ids);

    @PostMapping("/ywu/component/component.batch.query.by.ids.spi.with.no.content")
    CommonResult<List<ComponentEntity>> batchQueryByIdsWithNoContent(@RequestBody List<Integer> ids);
}
